package org.iks.feign.config;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class FeignInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate requestTemplate) {

    }

//    @Override
//    public void apply(RequestTemplate requestTemplate) {
//        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
//        if (attributes == null) {
//            return;
//        }
//        HttpServletRequest request = attributes.getRequest();
//        String token = request.getHeader(TokenConstants.AUTHENTICATION);
//        requestTemplate.header(TokenConstants.AUTHENTICATION, token);
//    }

}
